package com.ks.app.ad.hibernate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * KsAdImage entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "KS_AD_IMAGE")
public class KsAdImage implements java.io.Serializable {

	// Fields
	private static final long serialVersionUID = 7191028929326802737L;
	
	private long adimgid;//主键ID
	private long adid;//广告表的ID
	private String resolution;//分辨率
	private String imagepath;//图片存储路径

	// Constructors

	/** default constructor */
	public KsAdImage() {
	}

	/** minimal constructor */
	public KsAdImage(long adimgid) {
		this.adimgid = adimgid;
	}

	/** full constructor */
	public KsAdImage(long adimgid, long adid, String resolution,
			String imagepath) {
		this.adimgid = adimgid;
		this.adid = adid;
		this.resolution = resolution;
		this.imagepath = imagepath;
	}

	// Property accessors
	@Id
	@SequenceGenerator(name = "KS_AD_IMAGE_LOG", sequenceName = "KS_AD_IMAGE_SEQ", allocationSize = 1, initialValue = 0)
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "KS_AD_IMAGE_LOG")
	@Column(name = "ADIMGID", unique = true, nullable = false, precision = 22, scale = 0)
	public long getAdimgid() {
		return this.adimgid;
	}

	public void setAdimgid(long adimgid) {
		this.adimgid = adimgid;
	}

	@Column(name = "ADID", precision = 22, scale = 0)
	public long getAdid() {
		return this.adid;
	}

	public void setAdid(long adid) {
		this.adid = adid;
	}

	@Column(name = "RESOLUTION")
	public String getResolution() {
		return this.resolution;
	}

	public void setResolution(String resolution) {
		this.resolution = resolution;
	}

	@Column(name = "IMAGEPATH")
	public String getImagepath() {
		return this.imagepath;
	}

	public void setImagepath(String imagepath) {
		this.imagepath = imagepath;
	}

}